using MediatR;
using RBAC.ErrorCode;
using System.Collections.Generic;

namespace RBAC.Write.Api.Application.Command.ProcessManagements
{
    /// <summary>
    /// 编辑工艺流程（主信息 + 明细与附件全量覆盖）
    /// </summary>
    public class UpdateProcessFlowCommand : IRequest<APIResult<int>>
    {
        /// <summary>
        /// 工艺流程ID
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 工艺流程编号（唯一）
        /// </summary>
        public string? FlowCode { get; set; }

        /// <summary>
        /// 系统编号（可选显示用）
        /// </summary>
        public string? SystemCode { get; set; }

        /// <summary>
        /// 工艺流程名称（唯一）
        /// </summary>
        public string? FlowName { get; set; }

        /// <summary>
        /// 负责人用户Id
        /// </summary>
        public long? OwnerUserId { get; set; }

        /// <summary>
        /// 负责人用户名
        /// </summary>
        public string? OwnerUserName { get; set; }

        /// <summary>
        /// 所属部门Id
        /// </summary>
        public long? DepartmentId { get; set; }

        /// <summary>
        /// 所属部门名称
        /// </summary>
        public string? DepartmentName { get; set; }

        /// <summary>
        /// 状态（1=启用，0=禁用）
        /// </summary>
        public int Status { get; set; } = 1;

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 明细工序集合（全量覆盖）
        /// </summary>
        public List<ProcessFlowDetailInput>? Details { get; set; }

        /// <summary>
        /// 附件集合（全量覆盖）
        /// </summary>
        public List<ProcessFlowAttachmentInput>? Attachments { get; set; }
    }
}
